(function() {

this.codium = this.codium || {};
this.codium.panel = this.codium.panel || {};

this.codium.panel.Setting = codium.panel.BasicPanel.extend(
{
	init : function() 
	{
		this._super();
		
		this.setIcon(this.libDir + "/img/icon/menuSetting.png");
		this.setCaption("Project Setting");
		
		this.pnlSetting = new pasta.webgui.ContainerControl();
		this.pnlSetting.setLeft(10);
		this.pnlSetting.setTop(40);
		this.pnlSetting.setWidth(this.getWidth() - (2 * this.pnlSetting.getLeft()));
		this.pnlSetting.setHeight(this.getHeight() - this.pnlSetting.getTop() - this.pnlSetting.getLeft());
		this.pnlSetting.setBorderColor("#FFFFFF");
		this.pnlSetting.setBgColor("#FEFEFE");
		this.pnlSetting.setShadow("0px 2px 4px #000000");
		this.addControl(this.pnlSetting);
		
			this.lblSettingCaption = new pasta.webgui.Label();
			this.lblSettingCaption.setLeft(5);
			this.lblSettingCaption.setTop(5);
			this.lblSettingCaption.setWidth(200);
			this.lblSettingCaption.setCaption("Project Setting :");
			this.lblSettingCaption.font.setBold(true);
			this.lblSettingCaption.font.setSize(12);
			this.pnlSetting.addControl(this.lblSettingCaption);
			
			this.shpSettingCaption = new pasta.webgui.Shape();
			this.shpSettingCaption.setLeft(this.lblSettingCaption.getLeft());
			this.shpSettingCaption.setTop(this.lblSettingCaption.getTop() + 20);
			this.shpSettingCaption.setWidth(this.pnlSetting.getWidth() - (2 * this.shpSettingCaption.getLeft()));
			this.shpSettingCaption.setMode(2);
			this.pnlSetting.addControl(this.shpSettingCaption);
	},	
	
	//-------------------- Service Event Handler --------------
	
	setWidth : function(data)
	{
		this._super(data);
		
		if (this.pnlSetting != null)
		{
			this.pnlSetting.setWidth(this.getWidth() - (2 * this.pnlSetting.getLeft()));
			
				this.shpSettingCaption.setWidth(this.pnlSetting.getWidth() - (2 * this.shpSettingCaption.getLeft()));
		}
	},
	
	setHeight : function(data)
	{
		this._super(data);
		
		if (this.pnlSetting != null)
		{
			this.pnlSetting.setHeight(this.getHeight() - this.pnlSetting.getTop() - this.pnlSetting.getLeft());
		}
	},
	
});

})();